all:test_client test_server

# 发布版本构建
test_client:test_client.cc
	g++ -o $@ $^ -std=c++17 -lpthread -ljsoncpp -lmuduo_net -lmuduo_base

test_server:test_server.cc
	g++ -o $@ $^ -std=c++17 -lpthread -ljsoncpp -lmuduo_net -lmuduo_base

# 调试版本构建
debug_client:test_client.cc
	g++ -g -O0 -o  $@ $^ -std=c++17 -lpthread -ljsoncpp -lmuduo_net -lmuduo_base

debug_server:test_server.cc
	g++ -g -O0 -o  $@ $^ -std=c++17 -lpthread -ljsoncpp -lmuduo_net -lmuduo_base

debug_all:debug_client debug_server

.PHONY:clean debug_all
clean:
	rm -f test_client test_server debug_client debug_server